package com.kws.merchant.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kws.merchant.domain.AttentionEntity;
import com.kws.merchant.domain.po.AttentionPo;
import com.kws.merchant.domain.vo.AttentionVo;
import com.kws.merchant.domain.vo.GoodsCollectVo;

import java.util.List;


/**
 * @author : zhangbenting
 * @date : 2024/11/2 9:46
 * @Version: 1.0
 */
public interface AttentionService extends IService<AttentionEntity> {

    boolean attentionShopCartGoods(AttentionPo attentionPo);

    Page<AttentionVo> getAttentionList(AttentionPo attentionPo);

    Page<GoodsCollectVo> getCollectList(AttentionPo attentionPo);

    /**
     * 商品收藏
     * @param userId
     * @param time
     * @return
     */
    Double listCollectByTime(Long userId, String time);

    /**
     * 根据时间查询收藏人数
     * @param userId
     * @param time
     * @return
     */
    Double listCollectPersonByTime(Long userId, String time);

    /**
     * 判断是否已关注
     * @param attentionPo
     * @return
     */
    boolean isAttention(AttentionPo attentionPo);

    boolean cancelAttentionShopCartGoods(AttentionPo attentionPo);

    /**
     * 总商品收藏
     * @param userId
     * @return
     */
    Double countCollect(Long userId);

    /**
     *总收藏人数
     * @param userId
     * @return
     */
    Double countCollectPerson(Long userId);

    /**
     * 新增商品浏览记录时间
     * @param goodsViewId
     * @param time
     * @return
     */
    Object updateGoodsView(Long goodsViewId, Long time);
}
